<?php

class Core_Backend_Component_Customer_View_Showroom_Edit extends Core_Backend_Component_Customer_View_Showroom_Create {

	protected function buildToolbar($toolbar) {
		parent::buildToolbar($toolbar);
		if($this->getIdentity()->isAllowAction('customer_showroom_reviewer') 
			&& $this->getModel()->getStatus()!="draft"){
			$group = $toolbar->createGroup('publish');
			$group->addButton($this->__('share.button.publish'))
				->bindEvent('click', "submitPublish('" . $this->getForm()->getId() . "', '" . $this->getUrl(array('ids'=>array($this->getModel()->getId())), 'publish') . "')");
			$group->addButton($this->__('share.button.forbid'))
				->bindEvent('click', "submitForbid('" . $this->getForm()->getId() . "', '" . $this->getUrl(array('ids'=>array($this->getModel()->getId())), 'forbid') . "')");
		}
	}
}